

dplayer.on('seeked',function () {
    console.log(dplayer)
    console.log("seek to "+dplayer.video.currentTime)
})

dplayer.on('play',function () {
    console.log("play to "+dplayer.video.currentTime)
})

dplayer.on('pause',function () {
    console.log("pause to "+dplayer.video.currentTime)
})

dplayer.on('ratechange',function () {
    console.log(dplayer.video.playbackRate)
})

function synchronization() {
    console.log(123)
}

$(function () {
    $("#submit").on("submit", function (event) {
        var form = getFormData(this);
        $.get(form.api, {url: form.url}, function (res) {
            var data = JSON.parse(res)
            dplayer.switchVideo(
                {
                    url: data.data.url,
                }
            );
        })
        event.preventDefault();
    })
})


function myonmessage(e) {
    console.log(e)
}


function pause () {

}
